const express = require('express');
const router = express.Router();
const home = require('../models/home');
const request = require('../models/request');

router.use('/', function (req, res, next) {
    res.locals.home = home;
    next();
});

/* GET home page. */
router.get('/', function (req, res, next) {
    res.render('index');
});

router.get('/req', function (req, res, next) {
    var request = request(req);
    res.json(request);
});

router.get('/res', function (req, res, next) {
    res.json({});
});

module.exports = router;
